package _240314;

import java.time.*;

public class Main240314 {
	
	public static void main(String[] args) {
		LocalDate t1 = LocalDate.of(2000, 1, 1);
		LocalDate end = LocalDate.of(2000000, 1, 1);
		int flag = 0;
		while( t1.compareTo(end)!= 1 ) {
			if(t1.getYear()%t1.getMonthValue() == 0 && t1.getYear()%t1.getDayOfMonth()==0) {
				flag++;
			}
			t1 = t1.plusDays(1);	
		}
		System.out.println(flag);
	}
}
